#ifndef __CPPTUTORLOCALCLASS_H__
#define __CPPTUTORLOCALCLASS_H__

#include "cppTutorGlobals.h"

#include "cppTutorLog.h"
extern CcppTutorLog Log;

class CcppTutorLocalClass {
    private:
        static int m_nsValue;
    public:
        CcppTutorLocalClass ();
       ~CcppTutorLocalClass ();

        void m_InterfaceMethod () {
            Log << "ENTER : CcppTutorLocalClass :: m_InterfaceMethod()" << endl;
            class CLocal {
                private:
                    int m_nLocalValue;
                    //error: local class class CcppTutorLocalClass::m_InterfaceMethod()::CLocal shall not have static data member
                    //static int m_nsLocalValue;
                public:
                    CLocal () : m_nLocalValue (100) {
                        Log << "ENTER : CLocal :: CLocal()" << endl;
                        Log << "EXIT  : CLocal :: CLocal()" << endl;
                    }
                   ~CLocal () {
                        Log << "ENTER : CLocal :: ~CLocal()" << endl;
                        Log << "EXIT  : CLocal :: ~CLocal()" << endl;
                    }
            };
            Log << "EXIT  : CcppTutorLocalClass :: m_InterfaceMethod() [" << m_nsValue << " : " << __LINE__ << "]"<< endl;
        }
};

#endif //__CPPTUTORLOCALCLASS_H__
